# gogs

FROM            10.0.16.125:5080/general/centos:7
MAINTAINER      Lijc lijc@siccs.cn
# install rpm
RUN             yum install -y git
# import gogs
ADD             linux_amd64.tar.gz /opt/
# import gogs config file
RUN             cd /opt/gogs && mkdir -p custom/conf
ADD             app.ini /opt/gogs/custom/conf
# create persistent volume directory
RUN             mkdir /opt/pv
RUN             cd /opt/pv && mkdir gogs_data gogs_repo gogs_log
# modify gogs web
RUN             rm -f /opt/gogs/public/img/favicon.png
ADD             favicon.png /opt/gogs/public/img/
RUN             rm -f /opt/gogs/templates/home.tmpl
ADD             home.tmpl /opt/gogs/templates/
RUN             sed -i 's#https://gogs.io/docs#http://siccs.cn#' /opt/gogs/templates/base/head.tmpl
RUN             sed -i -e 's/Gogs /SICCS-Git /' -e 's#https://gogs.io#http://siccs.cn#' /opt/gogs/templates/base/footer.tmpl
# import docker entry script
ADD             docker-entrypoint /opt/
RUN             chmod 0755 /opt/docker-entrypoint
EXPOSE          3080
CMD             /opt/docker-entrypoint

